package com.charging.controller.user;

import com.charging.entity.ChargingPile;
import com.charging.service.ChargingPileService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/user/map")
public class MapController {

    @Resource
    private ChargingPileService chargingPileService;

    @GetMapping("/mapDetail")
    public String map(Model model){
        ChargingPile chargingPile = chargingPileService.getMap();
        model.addAttribute("chargingPile",chargingPile);
        return "user/map/mapDetail";
    }
}
